package com.java.comprehensive.design.structural_model.decorator_pattern;

/**
 * 具体装饰者角色
 */
public class Egg extends Garnish {


    public Egg(FastFood fastFood) {
        super(1, "鸡蛋", fastFood);
    }

    @Override
    float cost() {
        return getPrice() + getFastFood().getPrice();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
